package cn.nohan.funplay.module.member.mongo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mongoplus.annotation.ID;
import com.mongoplus.annotation.collection.CollectionField;
import com.mongoplus.annotation.collection.CollectionName;
import lombok.Data;

import java.util.Date;

@Data
@CollectionName("comment")
public class MongoCommentEntity {

	@ID
    private String id;
	
	/**
	 * 动态ID
	 */
	@CollectionField("dynamicId")
	private String dynamicId;
	
	/**
	 * 评论内容
	 */
	@CollectionField("comment")
	private String comment;
	
	/**
	 * 评论用户ID
	 */
	@CollectionField("userId")
	private Long userId;
	
	/**
	 * 评论用户昵称
	 */
	@CollectionField("userNickname")
	private String userNickname;
	
	/**
	 * 评论用户头像
	 */
	@CollectionField("userAvatar")
	private String userAvatar;
	
	/**
	 * 被回复用户ID
	 */
	@CollectionField("replyUserId")
	private Long replyUserId;
	
	/**
	 * 被回复用户昵称
	 */
	@CollectionField("replyUserNickname")
	private String replyUserNickname;
	
	/**
	 * 被回复用户头像
	 */
	@CollectionField("replyUserAvatar")
	private String replyUserAvatar;
	
	/**
	 * 创建时间
	 */
	@CollectionField("createTime")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	private Date createTime;

}
